#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QPropertyAnimation>
#include <QPropertyAnimation>

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    ui->declarativeView->viewport()->setAutoFillBackground(false);
    //this->setAutoFillBackground(false);
    this->setAttribute(Qt::WA_TranslucentBackground);


}



MainWindow::~MainWindow()
{
    delete ui;
    delete mAnimation;
}

void MainWindow::on_pushButton_clicked()
{

    this->
    mAnimation = new QPropertyAnimation(this, "geometry",this);
    mAnimation->setDuration(1000);
    mAnimation->setEasingCurve(QEasingCurve::InOutQuad);
    mAnimation->setEndValue(QRect(0, 2000, 1024, 300));
    mAnimation->start();
}



void MainWindow::on_pushButton_2_clicked()
{
    ui->declarativeView->setSource(QUrl::fromLocalFile("/home/emugwaneza/QTProject/myOwnProjetct/totem/mail.qml"));
}
